/* TestView.h
Michael Zahniser, 01/08/09

For testing out the Interface class, it's often useful to be able to create a
placeholder view. TestView is just a view, within an Interface, that is drawn
in the specified color so that it can be easily identified.
*/

#ifndef __MZ_TEST_VIEW_H__
#define __MZ_TEST_VIEW_H__

#include "View.h"



class TestView : public View {
public:
	TestView(int r, int g, int b)
		: r(r), g(g), b(b)
	{
	}


protected:
	virtual bool Initialize(const Surface &surface)
	{
		return true;
	}

	virtual bool Handle(const SDL_Event &event)
	{
		// Flicker the colors to show that an event occurred here.
		g ^= 32;

		return true;
	}

	virtual void Draw(Surface surface) const
	{
		surface.Erase(surface.Color(r, g, b));
	}


private:
	int r;
	int g;
	int b;
};



#endif
